package com.xxh.blog.dao;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xxh.blog.entity.Comment;
import com.xxh.blog.entity.vo.CommentVo;
import com.xxh.blog.entity.vo.EssayDetailVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Component;

@Component("CommentDao")
public interface CommentDao extends BaseMapper<Comment> {
    int deleteByPrimaryKey(Long id);

//    int insert(Comment record);

    int insertSelective(Comment record);

    Comment selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(Comment record);

    int updateByPrimaryKey(Comment record);

    IPage<CommentVo> paging(Page page,@Param(Constants.WRAPPER) QueryWrapper<CommentVo> wrapper);
}